
<html><HEAD>
<LINK REL=STYLESHEET HREF="default.css" TYPE="text/css">
<TITLE>
Deploying DataWindow objects to the component server</TITLE>
</HEAD>
<BODY>

<!-- Header -->
<p class="ancestor" align="right"><A HREF="dwprgugp44.htm">Previous</A>&nbsp;&nbsp;<A HREF="dwprgugp46.htm" >Next</A>
<!-- End Header -->
<A NAME="BABCDJEH"></A><h1>Deploying DataWindow objects to the component server</h1>
<A NAME="TI1694"></A><p>When you run a Web
DataWindow application, the definitions of your DataWindow objects
must be available on the component server. You can ensure this by
copying the PBL or PBD file that contains the definition of the objects
to the server. If you are using <ABBR title = "e a server" >EAServer</ABBR>,
the files must be in the server's path, or if the server
component is running as a service, in the system path. COM+ always
runs as a service, so the files must be in the COM+ server's system
path.</p>
<A NAME="TI1695"></A><p>For more information about setting up your development environment,
see <A HREF="dwprgugp49.htm#BABBFFEI">"Server configuration requirements"</A>.</p>
<A NAME="BABFHFFD"></A><h2>The Web DataWindow Container project wizard</h2>
<A NAME="TI1696"></A><p>In PowerBuilder, you can use the Web DataWindow Container
project wizard to create a project that deploys a custom version
of the Web DataWindow server component (HTMLGenerator115) to <ABBR title = "e a server" >EAServer</ABBR> with all the DataWindow
objects in your library list built into the deployed PBD.</p>
<A NAME="TI1697"></A><p>Because you are using a custom component instead of the preinstalled HTMLGenerator115
component, you can set properties for your component in <ABBR title = "e a server" >EAServer</ABBR> Manager. Setting properties
reduces the number of method calls required to configure the component
and can result in improved performance, maintainability, and scalability.</p>
<A NAME="TI1698"></A><h4>Using the wizard</h4>
<A NAME="TI1699"></A><p>When you have defined the DataWindow objects you need, start
the Web DataWindow Container wizard from the Project page of the
New dialog box and follow the instructions in the wizard. </p>
<A NAME="TI1700"></A><p>The choices you make in the wizard are similar to those you
make for other <ABBR title = "e a server" >EAServer</ABBR> components,
such as whether to support instance pooling or live editing. The
package and component can have any names you want, with the exception
that you cannot name the package <i>DataWindow</i> (the
name of the package that contains the preinstalled HTMLGenerator115
component). You cannot set component type or transaction support
properties. </p>
<A NAME="TI1701"></A><p>Building the Web DataWindow Container project presets some
of the properties of the component that you would otherwise need
to set in scripts or in <ABBR title = "e a server" >EAServer</ABBR> Manager.
You can specify a database profile in the wizard or Project painter
to set the com.sybase.datawindow.trans.dbms and other database transaction
properties. If you want calls to component methods to be written
to the server log, select Enable Trace to set the com.sybase.datawindow.trace
property.</p>
<p><img src="images/note.gif" width=17 height=17 border=0 align="bottom" alt="Note"> <span class=shaded>Connection or data source cache</span> <A NAME="TI1702"></A>Specifying a profile sets database transaction properties
for the component, but you still need to create a connection cache
(<ABBR title = "e a server" >EAServer</ABBR> 5.x) or data source
cache (<ABBR title = "e a server" >EAServer</ABBR> 6.x) in <ABBR title = "e a server" >EAServer</ABBR> Manager for the database
that the component will access.</p>
<A NAME="TI1703"></A><h4>Service classes</h4>
<A NAME="TI1704"></A><p>You can add a custom class user object to your project to
perform any special processing you require. This object acts as
a service class. The custom class user object must be in the same
library as the DataWindow objects or on the target's library
list. When you build the Web DataWindow Container project, select
the class in the Select Objects dialog box in the Project painter.</p>
<A NAME="TI1705"></A><p>For more information, see <A HREF="dwprgugp52.htm#BABCDFBF">"Using service classes"</A>.</p>
<A NAME="TI1706"></A><h4>Instantiating the container component</h4>
<A NAME="TI1707"></A><p>When you create an instance of the container component, you
must either provide a Java proxy for the component or pass DataWindow/HTMLGenerator115
as the last argument to the CreateComponent method. This specifies
that the component uses the proxy provided for the generic component.
For example: <p><PRE> dwObj = java.CreateComponent<br>        ("ContainerPkg/ContComponent",<br>        "iiop://testMachine:2000", "Jagadmin", "mypass",<br>        "DataWindow/HTMLGenerator115" );</PRE></p>
<A NAME="TI1708"></A><p>This is the same way you instantiate custom components. For
more information on custom components, see <A HREF="dwprgugp51.htm#CHDDFJGC">"Instantiating the custom
component"</A>.</p>
<A NAME="TI1709"></A><h4>Selecting a DataWindow from the container component</h4>
<A NAME="TI1710"></A><p>To select a DataWindow from the container component, you must
use the SetDWObjectEx method rather than the SetDWObject method:</p>
<A NAME="TI1711"></A><p><p><PRE> //Only the DW is needed, as package already specified //above when connecting<br>retVal = dwObj.SetDWObjectEx("d_mydw"); document.write("SetDwObject = " + retVal);</PRE></p>
<A NAME="TI1712"></A><p>For more information on the SetDWObject method, see <A HREF="dwprgugp50.htm#BABJJDCG">"Loading the DataWindow object"</A> and the <i>DataWindow
Reference</i>
.</p>

